#ifndef dq_Pred_h
#define dq_Pred_h

#include <functional>

namespace serika
{
	namespace dq
	{
		class ItemTypeFilterPred : public std::unary_function<Item*, bool>
		{
		public:
			ItemTypeFilterPred(int itemType) : mItemType(itemType) {}
			bool operator () (Item* item) const
			{
				return mItemType == item->GetItemType();
			}

		private:
			int mItemType;
		};

		class LessItemIdPred : public std::binary_function<Item, int, bool>
		{
		public:
			bool operator () (Item* item, int id) const
			{
				return item->GetId() < id;
			}

			bool operator () (int id, Item* item) const
			{
				return id < item->GetId();
			}

			bool operator () (Item* lhs, Item* rhs) const
			{
				return lhs->GetId() < rhs->GetId();
			}
		};
	}
}

#endif
